var Weather = Class.create();
Weather.prototype = {
	// 
	xmlPath: "/weather.jspa",
	city: 1,
	initialize: function(node) {
		this.node = node;
	},
	// 
	show: function(city) {
	    this.city=city;
	    if(this.city==false){
	      this.city=6;
	    };
		new Ajax.Request(
			this.xmlPath,
			{
				method: "get",
				parameters: $H({city:this.city}).toQueryString(),
				onSuccess: this.onAjaxComplete.bind(this)
			});
	},
	onAjaxComplete: function(request) {
			this.node.innerHTML = request.responseText;
	}
};
function getWeather(pos,city){
 	var node=document.getElementById(pos);
	var weath=new Weather(node);
 	weath.show(city);
}

